<?php

namespace Home\Controller;
use Think\Controller;
header('content-type:text/html;charset=utf-8');
class BaseController extends Controller{
	
	public function _initialize(){
		//检测登录状态
		$userid = session('user');
		if(CONTROLLER_NAME!='Index'){
			if(empty($userid['id'])){
				$this->redirect('Index/index');
			}
		}
		if(F('url')=='http://api.abclily.com/Home/Index/getPk10?t='){
			$this->assign('url','pk10');
		}else{
			$this->assign('url','xyft');
		}
		$userinfo = M('user')->where("id = {$userid['id']}")->find();
		$this->assign('userinfo',$userinfo);
	}
	
}


?>